<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class template basic_managed_external_buffer</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../../interprocess/indexes_reference.html#doxygen.boost_interprocess_header_reference.managed__external__buffer_8hpp" title="Header &lt;boost/interprocess/managed_external_buffer.hpp&gt;">
<link rel="prev" href="message__queue_8hpp_1a0d9116f62e6408d68a78a63dcb46c0e3.html" title="Type definition message_queue">
<link rel="next" href="managed__external__buffer_8hpp_1af847c2a3013bb979840d52e42e04920c.html" title="Type definition managed_external_buffer">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="message__queue_8hpp_1a0d9116f62e6408d68a78a63dcb46c0e3.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../interprocess/indexes_reference.html#doxygen.boost_interprocess_header_reference.managed__external__buffer_8hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="managed__external__buffer_8hpp_1af847c2a3013bb979840d52e42e04920c.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__managed__external__buffer"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template basic_managed_external_buffer</span></h2>
<p>boost::interprocess::basic_managed_external_buffer</p>
</div>
<h2 class="refsynopsisdiv-title">Synopsis</h2>
<div class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../interprocess/indexes_reference.html#doxygen.boost_interprocess_header_reference.managed__external__buffer_8hpp" title="Header &lt;boost/interprocess/managed_external_buffer.hpp&gt;">boost/interprocess/managed_external_buffer.hpp</a>&gt;

</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> CharType<span class="special">,</span> <span class="keyword">typename</span> AllocationAlgorithm<span class="special">,</span> 
         <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">IndexConfig</span> <span class="special">&gt;</span> <span class="keyword">class</span> IndexType<span class="special">&gt;</span> 
<span class="keyword">class</span> <a class="link" href="classboost_1_1interprocess_1_1basic__managed__external__buffer.html" title="Class template basic_managed_external_buffer">basic_managed_external_buffer</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
  <span class="comment">// types</span>
  <span class="keyword">typedef</span> <span class="identifier">base_t</span><span class="special">::</span><span class="identifier">size_type</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__managed__external__buffer_1a3ce7140c79885a65d978c23726dd2078"></a><span class="identifier">size_type</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="classboost_1_1interprocess_1_1basic__managed__external__buffer.html#id33-bb">public member functions</a></span>
  <a class="link" href="classboost_1_1interprocess_1_1basic__managed__external__buffer.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__managed__external__buffer_1a15fc7a4cca86a1801b101de34b688f02"><span class="identifier">basic_managed_external_buffer</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <a class="link" href="classboost_1_1interprocess_1_1basic__managed__external__buffer.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__managed__external__buffer_1a68db14ac1e318440b4064bbeeec43895"><span class="identifier">basic_managed_external_buffer</span></a><span class="special">(</span><a class="link" href="structboost_1_1interprocess_1_1open__only__t.html" title="Struct open_only_t">open_only_t</a><span class="special">,</span> <span class="keyword">void</span> <span class="special">*</span><span class="special">,</span> <span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1interprocess_1_1basic__managed__external__buffer.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__managed__external__buffer_1ad5b5688f356480fb017050fd1868fbb9"><span class="identifier">basic_managed_external_buffer</span></a><span class="special">(</span><a class="link" href="classboost_1_1interprocess_1_1basic__managed__external__buffer.html" title="Class template basic_managed_external_buffer">basic_managed_external_buffer</a> <span class="special">&amp;&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <a class="link" href="classboost_1_1interprocess_1_1basic__managed__external__buffer.html" title="Class template basic_managed_external_buffer">basic_managed_external_buffer</a> <span class="special">&amp;</span> 
  <a class="link" href="classboost_1_1interprocess_1_1basic__managed__external__buffer.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__managed__external__buffer_1a56f80e23a991a894063c785d4d0bbafe"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><a class="link" href="classboost_1_1interprocess_1_1basic__managed__external__buffer.html" title="Class template basic_managed_external_buffer">basic_managed_external_buffer</a> <span class="special">&amp;&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1interprocess_1_1basic__managed__external__buffer.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__managed__external__buffer_1a73a2e1e7e683c12b0ca9ad071d365592"><span class="identifier">grow</span></a><span class="special">(</span><span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1interprocess_1_1basic__managed__external__buffer.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__managed__external__buffer_1a649a1c4c28c0d82b37fd5f9a5d63f216"><span class="identifier">swap</span></a><span class="special">(</span><a class="link" href="classboost_1_1interprocess_1_1basic__managed__external__buffer.html" title="Class template basic_managed_external_buffer">basic_managed_external_buffer</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id-1.3.16.19.3.34.4.4"></a><h2>Description</h2>
<p>A basic user memory named object creation class. Inherits all basic functionality from basic_managed_memory_impl&lt;CharType, AllocationAlgorithm, IndexType&gt;*<span style="color: red">&lt;zwj&gt;&lt;/zwj&gt;</span>/ </p>
<div class="refsect2">
<a name="id-1.3.16.19.3.34.4.4.3"></a><h3>
<a name="id33-bb"></a><code class="computeroutput">basic_managed_external_buffer</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__managed__external__buffer_1a15fc7a4cca86a1801b101de34b688f02"></a><span class="identifier">basic_managed_external_buffer</span><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Default constructor. Does nothing. Useful in combination with move semantics </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__managed__external__buffer_1a68db14ac1e318440b4064bbeeec43895"></a><span class="identifier">basic_managed_external_buffer</span><span class="special">(</span><a class="link" href="structboost_1_1interprocess_1_1open__only__t.html" title="Struct open_only_t">open_only_t</a><span class="special">,</span> <span class="keyword">void</span> <span class="special">*</span> addr<span class="special">,</span> <span class="identifier">size_type</span> size<span class="special">)</span><span class="special">;</span></pre>
<p>Creates and places the segment manager. This can throw The external memory supplied by the user shall be aligned to the maximum value between <code class="computeroutput">alignof(std::max_align_t)</code> and the strictest alignment of any over-aligned type to be built !inside that memory. <a class="link" href="classboost_1_1interprocess_1_1basic__managed__external__buffer.html" title="Class template basic_managed_external_buffer">basic_managed_external_buffer</a> (<a class="link" href="structboost_1_1interprocess_1_1create__only__t.html" title="Struct create_only_t">create_only_t</a>, void *addr, size_type size) { Check if alignment is correct BOOST_ASSERT((0 == (((std::size_t)addr) &amp; (AllocationAlgorithm::Alignment - size_type(1u))))); if(!base_t::create_impl(addr, size)){ throw <a class="link" href="classboost_1_1interprocess_1_1interprocess__exception.html" title="Class interprocess_exception">interprocess_exception</a>("Could not initialize buffer in basic_managed_external_buffer constructor"); } }</p>
<p>!Creates and places the segment manager. This can throw !The external memory supplied by the user shall be aligned to the maximum value between !<code class="computeroutput">alignof(std::max_align_t)</code> and the strictest alignment of any over-aligned type to be built inside that memory. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__managed__external__buffer_1ad5b5688f356480fb017050fd1868fbb9"></a><span class="identifier">basic_managed_external_buffer</span><span class="special">(</span><a class="link" href="classboost_1_1interprocess_1_1basic__managed__external__buffer.html" title="Class template basic_managed_external_buffer">basic_managed_external_buffer</a> <span class="special">&amp;&amp;</span> moved<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>Moves the ownership of "moved"'s managed memory to *this. Does not throw. </li>
<li class="listitem">
<pre class="literallayout"><a class="link" href="classboost_1_1interprocess_1_1basic__managed__external__buffer.html" title="Class template basic_managed_external_buffer">basic_managed_external_buffer</a> <span class="special">&amp;</span> 
<a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__managed__external__buffer_1a56f80e23a991a894063c785d4d0bbafe"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><a class="link" href="classboost_1_1interprocess_1_1basic__managed__external__buffer.html" title="Class template basic_managed_external_buffer">basic_managed_external_buffer</a> <span class="special">&amp;&amp;</span> moved<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>Moves the ownership of "moved"'s managed memory to *this. Does not throw. </li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__managed__external__buffer_1a73a2e1e7e683c12b0ca9ad071d365592"></a><span class="identifier">grow</span><span class="special">(</span><span class="identifier">size_type</span> extra_bytes<span class="special">)</span><span class="special">;</span></pre>
<p>Tries to resize internal heap memory so that we have room for more objects. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__managed__external__buffer_1a649a1c4c28c0d82b37fd5f9a5d63f216"></a><span class="identifier">swap</span><span class="special">(</span><a class="link" href="classboost_1_1interprocess_1_1basic__managed__external__buffer.html" title="Class template basic_managed_external_buffer">basic_managed_external_buffer</a> <span class="special">&amp;</span> other<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Swaps the ownership of the managed heap memories managed by *this and other. Never throws. </p>
</li>
</ol></div>
</div>
</div>
</div>
<div class="copyright-footer">Copyright © 2005-2024 Ion Gaztanaga<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="message__queue_8hpp_1a0d9116f62e6408d68a78a63dcb46c0e3.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../interprocess/indexes_reference.html#doxygen.boost_interprocess_header_reference.managed__external__buffer_8hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="managed__external__buffer_8hpp_1af847c2a3013bb979840d52e42e04920c.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
